<template>
  <div>
    <test-plan-list v-if="!testPlanId" :projectId="projectId" @getTestPlanId="getTestPlanId"></test-plan-list>
    <test-overview v-else :testPlanId="testPlanId" :projectId="projectId" @getTestPlanId="getTestPlanId"></test-overview>
  </div>
</template>
<script>
import TestOverview from "@/views/project/init/test/testOverview/index.vue";
import TestPlanList from "@/views/project/init/test/testPlanList/index.vue";

export default {
  name: "Test",
  components: {TestPlanList, TestOverview},
  data() {
    return {
      testPlanId: null
    }
  },
  props: {
    projectId: {
      type: [Number],
    }
  },
  methods: {
    getTestPlanId(id) {
      this.testPlanId = id
    }
  }
}
</script>

<style scoped lang="scss">

</style>
